import request from '@/utils/request'

export const getUserPageApi = async (params: any) => {
    return request.get('/user', { params })
}

export const getUserByIdApi = async (id: string) => {
    return request.get(`/user/${id}`)
}

export const createUserApi = async (data: any) => {
    return request.post('/user', data)
}

export const updateUserApi = async (id: any, data: any) => {
    return request.put(`/user/${id}`, data)
}

export const deleteUserApi = async (id: string) => {
    return request.delete(`/user/${id}`)
}
